const mongoose = require('mongoose');

mongoose.connect("mongodb://127.0.0.1:27017/yang", { useNewUrlParser: true }, (err) => {
    if (err) {
        console.log(err);
        return;
    }

    console.log("mongo连接成功");
})

var Schema = mongoose.Schema;

var ObjectId = Schema.Types.ObjectId;

var UsersSchema = new Schema({
    name: String,
    Datetime: String
});

module.exports = mongoose.model("Users", UsersSchema, "Users");